'use strict';

module.exports = {
  up: async (queryInterface, Sequelize) => {
    const { INTEGER, STRING, DATE } = Sequelize;
    await queryInterface.createTable('banner', {
      id: { type: INTEGER, primaryKey: true, autoIncrement: true },
      user_id: STRING,
      title: STRING,
      img_url: STRING,
      target_url: STRING,
      start: DATE,
      end: DATE,
      created_at: DATE,
      updated_at: DATE,
    });
  },

  down: (queryInterface, Sequelize) => {
    /*
      Add reverting commands here.
      Return a promise to correctly handle asynchronicity.

      Example:
      return queryInterface.dropTable('users');
    */
  },
};
